Get Customer Packages
This API is used to retrieve a list of all customer packages created by the user for their sub-customers from the catalog.
| Method | Path |
|---|---|
| GET | api/v2/customer/{id}/package/created-packages |
Eligibility
The requestor is eligible to request information on packages that were created by them.
API Request
Request Structure
Not applicable
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure detailed description. |
| content | Object | O | Array of main response body object. Displayed when an API call is successful. For a failure, it will be empty. |
| pageable | Object | O | Paging information object. Displayed when an API call is successful. For a failure, it will be empty. |
Content
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| id | UUID | M | Package ID |
| name | String | M | Package name |
| description | String | O | Package description |
| nestedOffers | UUID | M | Array of offer IDs. At least one offer will be presented. The provided order of UUIDs in the array represents offer priority within the package. |
| eligibleSubAccountIds | String | M | Array of sub-account UUIDs. Specified sub-accounts are the accounts that are eligible to view and manage (attach/detach) this package as part of the self-service feature. Empty string – None of the customer’s sub-accounts are eligible for this package. ‘ALL’ keyword (ENUM) - All the customer’s sub-accounts are eligible for this package. |
| isEverUsed | Boolean | M | Indicates whether the package has been attached at least once. True – The package was attached at least once and therefore modification to its nested offers is forbidden. False – The package has not yet been attached and therefore anything can still be modified. |
pageable
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| page | Numeric | M | Page number |
| size | Numeric | M | Page size. Number of requested elements per page |
| totalPages | Numeric | M | Total amount of available pages per requested page size |
| totalElements | Numeric | M | Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible:
| Code | Message |
|---|---|
| GLOBAL_1001 | Service unavailable. Please try again |
| CUSTOMER_1002 | Customer does not exist |
| CUSTOMER_1006 | Failed to retrieve customer details |
Examples
Request Body
Not applicable
Response Body Success ACK
Copy
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "roaming",
"description": "roaming bundle",
"nestedOffers": [
"1b15048b-1ed4-4d34-a074-c7e26520e12a",
"ee74dca6-8e7f-4b85-a42b-13860913b3b1"
],
"eligibleSubAccountIds": [
"ff74dca6-8e7f-4b85-a42b-13860913b370",
"95aeee09-6dc4-41ba-9d1c-8584de2fcf0c"
],
"isEverUsed": false
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b250",
"name": "regular",
"description": "regular bundle",
"nestedOffers": [
"fb3e01cf-3798-4d53-b2b4-914b3e36c83c"
],
"eligibleSubAccountIds": [],
"isEverUsed": true
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body Failure NAK
Copy
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}